import request from '@/utils/request'


export default{
    //1.带条件查询所有博客
    getBlogList(current,size,blogInline){
        return request({
            // url: '/context/blog/listPage/'+current+'/'+size,
            url: `/context/blog/listPage/${current}/${size}`,
            method: 'post',
            data: blogInline
          })
    },
    //2.带条件查询所有博客
    saveBlog(blog){
        return request({
            url: `/context/blog/saveBlog`,
            method: 'post',
            data: blog
          })
    },
    //3.删除指定博客
    deleteBlog(blogId){
        return request({
            url: `/context/blog/delete/${blogId}`,
            method: 'delete'
          })
    },
    //4更具ID查询指定博客
    selectOneBlog(blogId){
        return request({
            url: `/context/blog/selectOne/${blogId}`,
            method: 'get'
          })
    },
    //5、更新博客
    updateBlog(emitBlogData){
        return request({
            url: `/context/blog/update`,
            method: 'post',
            data: emitBlogData
          })
    }



}
